//
//  Emoticons.swift
//  02-表情键盘
//
//  Created by  NorthCity on 15/11/13.
//  Copyright © 2015年  NorthCity. All rights reserved.
//

import UIKit

class Emoticon: NSObject {
/// 表情文字
    var chs:String?
/// 表情图片文件名字
    var png:String?
/// 图片路径
    var imagePath:String{
        return png == nil ? "": NSBundle.mainBundle().bundlePath + "/Emoticons.bundle/" + png!
    }
/// emoji 编码
    var code:String?{
        didSet{
            emoji = code?.emoji
        }
    }
/// emoji 字符串
    var emoji:String?
///  删除标记
    var isRemoved = false
//    MARK: - 构造函数
    init(isRemoved:Bool) {
        self.isRemoved = isRemoved
    }
/// 是否是空白按钮
    var isEmpty:Bool = false
    init(isEmpty:Bool){
        self.isEmpty = isEmpty
    }
    
    init(dict:[String:AnyObject]) {
        super.init()
        setValuesForKeysWithDictionary(dict)
    }
    override func setValue(value: AnyObject?, forUndefinedKey key: String){}
    
  override  var description:String{
        let keys = ["chs","png","code"]
       return dictionaryWithValuesForKeys(keys).description
    }
}
